﻿if (typeof Modules == "undefined") Modules = {};

Modules.Home = {
    Init: function () {
        var thisObj = this;
        var rID = $.GetURL('rID');
        var rType = $.GetURL('rType');
        
        if (rID == null || rID == '') {
            //Show Home Navigation Default
            rID = '9ABE5091-3B53-48CA-8119-1E27814C02CB';
            rType = 23;
        }
        Modules.Resource.Get({ 'rID': rID, 'rType': rType }, function (data) {
            if (data[1].length > 0) {
                thisObj.ShowResourceInfo(data[1]);
            }
        });
    },

    Show: function (data) {
        $('#content-body').html(data);
    },
    ShowResourceInfo: function (data) {
        var html = data[0].Summary + '<br/>' + data[0].Detail;
        $('#content-body').html(html);
    }
};

$(function () {
    Modules.Home.Init();
});

